import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Index',
        component: Index
    },
     //基础功能
     {
        path: '/SimpleWord/Word',
        name: 'Word',
        component: () =>
            import ('../views/SimpleWord/Word.vue')
    },
    {
        path: '/SimpleWord/Word1',
        component: () =>
            import ("../views/SimpleWord/Word1.vue")
    },
    {
        path: '/SimpleExcel/Excel',
        component: () =>
            import ('../views/SimpleExcel/Excel.vue')
    },
    {
        path: '/SimplePPT/PPT',
        component: () =>
            import ("../views/SimplePPT/PPT.vue")
    },
    {
        path: '/TitleText/Word',
        component: () =>
            import ('../views/TitleText/Word.vue')
    },
    {
        path: '/ControlBars/Word',
        component: () =>
            import ("../views/ControlBars/Word.vue")
    },
    {
        path: '/OpenWord/Word',
        component: () =>
            import ("../views/OpenWord/Word.vue")
    },
    {
        path: '/SaveReturnValue/Word',
        component: () =>
            import ("../views/SaveReturnValue/Word.vue")
    },
    {
        path: '/SendParameters/Word',
        component: () =>
            import ("../views/SendParameters/Word.vue")
    },
    {
        path: '/DataRegionFill/Word',
        component: () =>
            import ("../views/DataRegionFill/Word.vue")
    },
    {
        path: '/ExcelFill/Excel',
        component: () =>
            import ("../views/ExcelFill/Excel.vue")
    },
    {
        path: '/SubmitWord/Word',
        component: () =>
            import ("../views/SubmitWord/Word.vue")
    },
    {
        path: '/SubmitExcel/Excel',
        component: () =>
            import ("../views/SubmitExcel/Excel.vue")
    },
    {
        path: '/InsertSeal/index',
        component: () =>
            import ("../views/InsertSeal/index.vue")
    },
    {
        path: '/InsertSeal/Word/AddSeal/Word1',
        component: () =>
            import ("../views/InsertSeal/Word/AddSeal/Word1.vue")
    },
    {
        path: '/InsertSeal/Word/AddSeal/Word2',
        component: () =>
            import ("../views/InsertSeal/Word/AddSeal/Word2.vue")
    },
    {
        path: '/InsertSeal/Word/AddSeal/Word3',
        component: () =>
            import ("../views/InsertSeal/Word/AddSeal/Word3.vue")
    },
    {
        path: '/InsertSeal/Word/AddSeal/Word4',
        component: () =>
            import ("../views/InsertSeal/Word/AddSeal/Word4.vue")
    },
    {
        path: '/InsertSeal/Word/AddSeal/Word5',
        component: () =>
            import ("../views/InsertSeal/Word/AddSeal/Word5.vue")
    },
    {
        path: '/InsertSeal/Word/AddSeal/Word6',
        component: () =>
            import ("../views/InsertSeal/Word/AddSeal/Word6.vue")
    },
    {
        path: '/InsertSeal/Word/AddSeal/Word7',
        component: () =>
            import ("../views/InsertSeal/Word/AddSeal/Word7.vue")
    },
    {
        path: '/InsertSeal/Word/AddSeal/Word8',
        component: () =>
            import ("../views/InsertSeal/Word/AddSeal/Word8.vue")
    },
    {
        path: '/InsertSeal/Word/AddSeal/Word9',
        component: () =>
            import ("../views/InsertSeal/Word/AddSeal/Word9.vue")
    },
    {
        path: '/InsertSeal/Word/DeleteSeal/Word',
        component: () =>
            import ("../views/InsertSeal/Word/DeleteSeal/Word.vue")
    },
    {
        path: '/InsertSeal/Word/AddSign/Word1',
        component: () =>
            import ("../views/InsertSeal/Word/AddSign/Word1.vue")
    },
    {
        path: '/InsertSeal/Word/AddSign/Word2',
        component: () =>
            import ("../views/InsertSeal/Word/AddSign/Word2.vue")
    },
    {
        path: '/InsertSeal/Word/AddSign/Word3',
        component: () =>
            import ("../views/InsertSeal/Word/AddSign/Word3.vue")
    },
    {
        path: '/InsertSeal/Word/AddSign/Word4',
        component: () =>
            import ("../views/InsertSeal/Word/AddSign/Word4.vue")
    },
    {
        path: '/InsertSeal/Word/AddSign/Word5',
        component: () =>
            import ("../views/InsertSeal/Word/AddSign/Word5.vue")
    },
    {
        path: '/InsertSeal/PDF/AddSeal/PDF1',
        component: () =>
            import ("../views/InsertSeal/PDF/AddSeal/PDF1.vue")
    },
    {
        path: '/InsertSeal/PDF/AddSeal/PDF2',
        component: () =>
            import ("../views/InsertSeal/PDF/AddSeal/PDF2.vue")
    },
    {
        path: '/InsertSeal/PDF/AddSeal/PDF3',
        component: () =>
            import ("../views/InsertSeal/PDF/AddSeal/PDF3.vue")
    },
    {
        path: '/InsertSeal/PDF/DeleteSeal/PDF',
        component: () =>
            import ("../views/InsertSeal/PDF/DeleteSeal/PDF.vue")
    },
    {
        path: '/InsertSeal/PDF/AddSign/PDF1',
        component: () =>
            import ("../views/InsertSeal/PDF/AddSign/PDF1.vue")
    },

    {
        path: '/CommandCtrl/Word',
        component: () =>
            import ("../views/CommandCtrl/Word.vue")
    },
    {
        path: '/WordSetTable/Word',
        component: () =>
            import ("../views/WordSetTable/Word.vue")
    },
    {
        path: '/WordDataTag2/Word',
        component: () =>
            import ("../views/WordDataTag2/Word.vue")
    },
    {
        path: '/CustomToolButton/Word',
        component: () =>
            import ("../views/CustomToolButton/Word.vue")
    },
    {
        path: '/AfterDocOpened/Word',
        component: () =>
            import ("../views/AfterDocOpened/Word.vue")
    },
    {
        path: '/JsControlBars/Word',
        component: () =>
            import ("../views/JsControlBars/Word.vue")
    },

    {
        path: '/ExcelTable/Excel',
        component: () =>
            import ("../views/ExcelTable/Excel.vue")
    },
    // {
    //     path: '/ConcurrencyCtrl/index',
    //     component: () =>
    //         import ("../views/ConcurrencyCtrl/index.vue")
    // },
    // {
    //     path: '/ConcurrencyCtrl/Word',
    //     component: () =>
    //         import ("../views/ConcurrencyCtrl/Word.vue")
    // },

    {
        path: '/SaveAsHTML/Word',
        component: () =>
            import ("../views/SaveAsHTML/Word.vue")
    },
    {
        path: '/BeforeAndAfterSave/Word',
        component: () =>
            import ("../views/BeforeAndAfterSave/Word.vue")
    },
    {
        path: '/SaveDataAndFile/Word',
        component: () =>
            import ("../views/SaveDataAndFile/Word.vue")
    },
    {
        path: '/WordDisableRight/Word',
        component: () =>
            import ("../views/WordDisableRight/Word.vue")
    },
    {
        path: '/ExcelDisableRight/Excel',
        component: () =>
            import ("../views/ExcelDisableRight/Excel.vue")
    },

    {
        path: '/RevisionOnly/Word',
        component: () =>
            import ("../views/RevisionOnly/Word.vue")
    },
    {
        path: '/NoBlank/Word',
        component: () =>
            import ("../views/NoBlank/Word.vue")
    },
    {
        path: '/CommentOnly/Word',
        component: () =>
            import ("../views/CommentOnly/Word.vue")
    },

        {
            path: '/CallParentFunction/index',
            component: () =>
                import ("../views/CallParentFunction/index.vue")
        },
        {
            path: '/CallParentFunction/Word',
            component: () =>
                import ("../views/CallParentFunction/Word.vue")
        },
        {
            path: '/GetParentParamValue/index',
            component: () =>
                import ("../views/GetParentParamValue/index.vue")
        },
        {
            path: '/GetParentParamValue/Word',
            component: () =>
                import ("../views/GetParentParamValue/Word.vue")
        },
        {
            path: '/SwitchFile/Word',
            component: () =>
                import ("../views/SwitchFile/Word.vue")
        },

    

    //高级功能
    {
        path: '/ReadOnly/Word',
        component: () =>
            import ("../views/ReadOnly/Word.vue")
    },
    {
        path: '/DataBase/Word',
        component: () =>
            import ("../views/DataBase/Word.vue")
    },
    {
        path: '/POPDF/PDF',
        component: () =>
            import ("../views/POPDF/PDF.vue")
    },
    {
        path: '/SaveAsPDF/Word',
        component: () =>
            import ("../views/SaveAsPDF/Word.vue")
    },
    {
        path: '/WordResWord/Word',
        component: () =>
            import ("../views/WordResWord/Word.vue")
    },
    {
        path: '/WordResImage/Word',
        component: () =>
            import ("../views/WordResImage/Word.vue")
    },
    {
        path: '/WordResExcel/Word',
        component: () =>
            import ("../views/WordResExcel/Word.vue")
    },
    {
        path: '/AddWaterMark/Word',
        component: () =>
            import ("../views/AddWaterMark/Word.vue")
    },
    {
        path: '/WordDataTag/Word',
        component: () =>
            import ("../views/WordDataTag/Word.vue")
    },
    {
        path: '/DataRegionCreate/Word',
        component: () =>
            import ("../views/DataRegionCreate/Word.vue")
    },
    {
        path: '/FileMakerSingle/Default',
        component: () =>
            import ("../views/FileMakerSingle/Default.vue")
    },
    {
        path: '/WordTable/Word',
        component: () =>
            import ("../views/WordTable/Word.vue")
    },
    {
        path: '/WordHandDraw/Word',
        component: () =>
            import ("../views/WordHandDraw/Word.vue")
    },
    {
        path: '/DataRegionTable/Word',
        component: () =>
            import ("../views/DataRegionTable/Word.vue")
    },
    {
        path: '/DataRegionText/Word',
        component: () =>
            import ("../views/DataRegionText/Word.vue")
    },
    {
        path: '/DataRegionText/Word2',
        component: () =>
            import ("../views/DataRegionText/Word2.vue")
    },
    {
        path: '/DataRegionText/index',
        component: () =>
            import ("../views/DataRegionText/index.vue")
    },
    {
        path: '/SetDrByUserWord/index',
        component: () =>
            import ("../views/SetDrByUserWord/index.vue")
    },
    {
        path: '/SetDrByUserWord/Word',
        component: () =>
            import ("../views/SetDrByUserWord/Word.vue")
    },
    {
        path: '/SetDrByUserWord2/index',
        component: () =>
            import ("../views/SetDrByUserWord2/index.vue")
    },
    {
        path: '/SetDrByUserWord2/Word',
        component: () =>
            import ("../views/SetDrByUserWord2/Word.vue")
    },
    {
        path: '/MergeWordCell/Word',
        component: () =>
            import ("../views/MergeWordCell/Word.vue")
    },
    {
        path: '/MergeExcelCell/Excel',
        component: () =>
            import ("../views/MergeExcelCell/Excel.vue")
    },
    {
        path: '/SetXlsTableByUser/index',
        component: () =>
            import ("../views/SetXlsTableByUser/index.vue")
    },
    {
        path: '/SetXlsTableByUser/Excel',
        component: () =>
            import ("../views/SetXlsTableByUser/Excel.vue")
    },
    {
        path: '/SetExcelCellBorder/Excel',
        component: () =>
            import ("../views/SetExcelCellBorder/Excel.vue")
    },
    {
        path: '/SetExcelCellText/Excel',
        component: () =>
            import ("../views/SetExcelCellText/Excel.vue")
    },
    {
        path: '/DataRegionFill2/Word',
        component: () =>
            import ("../views/DataRegionFill2/Word.vue")
    },
    {
        path: '/ExcelFill2/Excel',
        component: () =>
            import ("../views/ExcelFill2/Excel.vue")
    },
    {
        path: '/DataRegionEdit/Word',
        component: () =>
            import ("../views/DataRegionEdit/Word.vue")
    },
    {
        path: '/DataTagEdit/Word',
        component: () =>
            import ("../views/DataTagEdit/Word.vue")
    },
    {
        path: '/DefinedNameCell/Excel',
        component: () =>
            import ("../views/DefinedNameCell/Excel.vue")
    },
    {
        path: '/DefinedNameTable/index',
        component: () =>
            import ("../views/DefinedNameTable/index.vue")
    },
    {
        path: '/FileMakerPDF/Default',
        component: () =>
            import ("../views/FileMakerPDF/Default.vue")
    },
    {
        path: '/DefinedNameTable/Excel',
        component: () =>
            import ("../views/DefinedNameTable/Excel.vue")
    },
    {
        path: '/DefinedNameTable/Excel2',
        component: () =>
            import ("../views/DefinedNameTable/Excel2.vue")
    },
    {
        path: '/DefinedNameTable/Excel4',
        component: () =>
            import ("../views/DefinedNameTable/Excel4.vue")
    },
    {
        path: '/DefinedNameTable/Excel5',
        component: () =>
            import ("../views/DefinedNameTable/Excel5.vue")
    },
    {
        path: '/DefinedNameTable/Excel6',
        component: () =>
            import ("../views/DefinedNameTable/Excel6.vue")
    },
    {
        path: '/WordCompare/Word',
        component: () =>
            import ("../views/WordCompare/Word.vue")
    },
    {
        path: '/WordTextBox/Word',
        component: () =>
            import ("../views/WordTextBox/Word.vue")
    },
    {
        path: '/SplitWord/Word',
        component: () =>
            import ("../views/SplitWord/Word.vue")
    },
    {
        path: '/CommentsList/Word',
        component: () =>
            import ("../views/CommentsList/Word.vue")
    },
    {
        path: '/RevisionsList/Word',
        component: () =>
            import ("../views/RevisionsList/Word.vue")
    },
    {
        path: '/WordCreateTable/Word',
        component: () =>
            import ("../views/WordCreateTable/Word.vue")
    },
    {
        path: '/SaveFirstPageAsImg/Word',
        component: () =>
            import ("../views/SaveFirstPageAsImg/Word.vue")
    },
    {
        path: '/ExcelAdjustRC/Excel',
        component: () =>
            import ("../views/ExcelAdjustRC/Excel.vue")
    },
    {
        path: '/WordDeleteRow/Word',
        component: () =>
            import ("../views/WordDeleteRow/Word.vue")
    },
    {
        path: '/InsertPageBreak2/Word',
        component: () =>
            import ("../views/InsertPageBreak2/Word.vue")
    },
    {
        path: '/ExcelInsertImage/Excel',
        component: () =>
            import ("../views/ExcelInsertImage/Excel.vue")
    },
    {
        path: '/WordTableSetImg/Word',
        component: () =>
            import ("../views/WordTableSetImg/Word.vue")
    },
    {
        path: '/WordTableBorder/Word',
        component: () =>
            import ("../views/WordTableBorder/Word.vue")
    },
    {
        path: '/ExtractImage/Word',
        component: () =>
            import ("../views/ExtractImage/Word.vue")
    },
    {
        path: '/OpenImage/Image',
        component: () =>
            import ("../views/OpenImage/Image.vue")
    },
    {
        path: '/DisableCopyOut/Word',
        component: () =>
            import ("../views/DisableCopyOut/Word.vue")
    },
    {
        path: '/InsertImageSetSize/Word',
        component: () =>
            import ("../views/InsertImageSetSize/Word.vue")
    },
    {
        path: '/HtmlDialog/Word',
        component: () =>
            import ("../views/HtmlDialog/Word.vue")
    },
    {
        path: '/HtmlDialog/Modal',
        component: () =>
            import ("../views/HtmlDialog/Modal.vue")
    },
    {
        path: '/HtmlDialog/Modeless',
        component: () =>
            import ("../views/HtmlDialog/Modeless.vue")
    },

    //综合演示
    {
        path: '/FileMaker/Default',
        component: () =>
            import ("../views/FileMaker/Default.vue")
    },
    {
        path: '/ExaminationPaper/index',
        component: () =>
            import ("../views/ExaminationPaper/index.vue")
    },
    {
        path: '/ExaminationPaper/Word',
        component: () =>
            import ("../views/ExaminationPaper/Word.vue")
    },
    {
        path: '/ExaminationPaper/Compose',
        component: () =>
            import ("../views/ExaminationPaper/Compose.vue")
    },
    {
        path: '/WordParagraph/Word',
        component: () =>
            import ("../views/WordParagraph/Word.vue")
    },
    {
        path: '/DrawExcel/Excel',
        component: () =>
            import ("../views/DrawExcel/Excel.vue")
    },
    {
        path: '/TaoHong/index',
        component: () =>
            import ("../views/TaoHong/index.vue")
    },
    {
        path: '/TaoHong/Word',
        component: () =>
            import ("../views/TaoHong/Word.vue")
    },
    {
        path: '/TaoHong/taoHong',
        component: () =>
            import ("../views/TaoHong/taoHong.vue")
    },
    {
        path: '/TaoHong/readOnly',
        component: () =>
            import ("../views/TaoHong/readOnly.vue")
    },
    {
        path: '/WordSalaryBill/index',
        component: () =>
            import ("../views/WordSalaryBill/index.vue")
    },
    {
        path: '/WordSalaryBill/Word',
        component: () =>
            import ("../views/WordSalaryBill/Word.vue")
    },
    {
        path: '/WordSalaryBill/OpenFile',
        component: () =>
            import ("../views/WordSalaryBill/OpenFile.vue")
    },
    {
        path: '/WordSalaryBill/Compose',
        component: () =>
            import ("../views/WordSalaryBill/Compose.vue")
    },
    {
        path: '/SaveAndSearch/index',
        component: () =>
            import ("../views/SaveAndSearch/index.vue")
    },
    {
        path: '/SaveAndSearch/Word',
        component: () =>
            import ("../views/SaveAndSearch/Word.vue")
    },
    {
        path: '/FileMakerPrintFiles/Default',
        component: () =>
            import ("../views/FileMakerPrintFiles/Default.vue")
    },
    {
        path: '/FileMakerPrintFiles/Preview',
        component: () =>
            import ("../views/FileMakerPrintFiles/Preview.vue")
    },
    {
        path: '/FileMakerConvertPDFs/Default',
        component: () =>
            import ("../views//FileMakerConvertPDFs/Default.vue")
    },
    {
        path: '/FileMakerConvertPDFs/Edit',
        component: () =>
            import ("../views/FileMakerConvertPDFs/Edit.vue")
    },
    {
        path: '/BingFa/Index',
        component: () =>
            import ("../views/BingFa/Index.vue"),
        children: [
            {
                path: '',//当path为''时，默认加载的组件
                component: () =>
                    import ("../views/BingFa/loginForm.vue"),
                
            },
            {
                path: '/BingFa/list/:username',
                name: 'list',
                component: () =>
                    import ("../views/BingFa/list.vue")
            }
        ]
    },
    {
        path: '/BingFa/Word1',
        component: () =>
            import ("../views/BingFa/Word1.vue")
    },
    {
        path: '/BingFa/Word2',
        component: () =>
            import ("../views/BingFa/Word2.vue")
    },

    //其他技巧
    {
        path: '/WordAddBKMK/Word',
        component: () =>
            import ("../views/WordAddBKMK/Word.vue")
    },
    {
        path: '/WordLocateBKMK/Word',
        component: () =>
            import ("../views/WordLocateBKMK/Word.vue")
    },
    {
        path: '/WordGetSelection/Word',
        component: () =>
            import ("../views/WordGetSelection/Word.vue")
    },
    {
        path: '/InsertImgForJs/Word',
        component: () =>
            import ("../views/InsertImgForJs/Word.vue")
    },
    {
        path: '/JsInsertWaterMark/Word',
        component: () =>
            import ("../views/JsInsertWaterMark/Word.vue")
    },
//v6.0新特性
{
    path: '/DivMessage/Word',
    component: () =>
        import ("../views/DivMessage/Word.vue")
},
{
    path: '/ApplicationForm/Word',
    component: () =>
        import ("../views/ApplicationForm/Word.vue")
},
{
    path: '/FormToDataRegions/Word',
    component: () =>
        import ("../views/FormToDataRegions/Word.vue")
},
{
    path: '/FileMakerToPDF/Default',
    component: () =>
        import ("../views/FileMakerToPDF/Default.vue")
},
]



const router = new VueRouter({
    mode: 'history',
    routes
})

router.beforeEach((to, from, next) => {
    if (!to.matched.length) {
      alert('页面不存在，请检查URL是否正确！');
    } else {
      next(); // 如果匹配到路由，则正常跳转
    }
  });
export default router